package top.xiaoshuaila.service;

import top.xiaoshuaila.pojo.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import top.xiaoshuaila.pojo.Menu;
import top.xiaoshuaila.pojo.RespBean;
import top.xiaoshuaila.pojo.Role;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 小帅啦
 * @since 2021-05-01
 */
public interface IAdminService extends IService<Admin> {

    //验证登录,返回一个统一返回对象RespBean
    RespBean login(String username, String password, String code, HttpServletRequest request);

    //通过username获去对应的Admin对象
    Admin getAdminByUserName(String username);

    List<Role>getRoles(Integer adminId);

    List<Admin> getAllAdmins(String keywords);

    RespBean updateAdminRole(Integer adminId, Integer[] rids);

    RespBean updateAdminPassword(String oldPass, String pass, Integer adminId);
}
